import axios from 'axios'

const request = axios.create({
  baseURL: 'https://restapi.amap.com/v3/',
})
const request2 = axios.create({
  baseURL: 'https://geo.datav.aliyun.com/areas_v3/bound',
})
//响应拦截
request.interceptors.response.use(
  (response) => {
    return response.data
  },
  (error) => {
    return Promise.reject(error)
  }
)
request2.interceptors.response.use(
  (response) => {
    return response.data
  },
  (error) => {
    return Promise.reject(error)
  }
)
export { request, request2 }
